package com.leehom.arch.storage.service.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.leehom.arch.storage.model.Storage;
import com.leehom.arch.storage.model.StorageRepository;
import com.leehom.arch.storage.service.StorageService;

/**
 * @类名: StorageServiceImpl
 * @说明: 
 *
 * @author   leehom
 * @Date	 2020年12月3日 上午10:36:31
 * 修改记录：
 *
 *   
 * @see 	 
 */
public class StorageServiceImpl implements StorageService {
	
	private static final Logger logger = LoggerFactory.getLogger(StorageService.class);
	
	private StorageRepository storageRepo;
	
	@Override
	public Storage getStorage(String rootUrl) {
		return storageRepo.getStorage(rootUrl);
	}
	
	@Override
	public void addStorage(Storage storage) {
		storageRepo.setStorage(storage);
	}
	
	@Override
	public void delStorage(Storage storage) {
		storageRepo.removeStorage(storage.getRootUrl());

	}

}
